#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
from sage.all import *
from curves import *
from experimental import *

g = 2


field = GF(2 ** 5, 'a')
a = field.gen()
Px = PolynomialRing(field, 'x')
x = Px.gen()

f = x ** 5 + x ** 3 + 1
h = x ** 2 + x
zero = 0 * x
one = 1 + zero

C = HyperellipticCurve(f, h)
assert (curveWithoutSingularPoints(f))
J = C.jacobian()

dd = [x * (x + a ** 30), a * x + 1]
ee = [(x + 1) * (x + a ** 30), (x * a ** 23) + a ** 12]
D = J(dd)
E = J(ee)
print "sage's output:", D + E
print "our's output:", addPointsTuples(dd, ee, f, h)


